package com.edu.dgut.dao;

import com.edu.dgut.entity.ordertableEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import javax.transaction.Transactional;
import java.util.List;

public interface ordertableRepository extends JpaRepository<ordertableEntity,String> {

    //通过订单号查询订单信息
    List<ordertableEntity> findByOrdertableId(String ordertable_id);

    //插入或修改订单信息
    ordertableEntity save(ordertableEntity ordertable);

    //通过订单号删除一条订单信息
    @Transactional
    int deleteByOrdertableId(String ordertable_id);

}
